import React from "react";
import styles from './Carousel.module.css';
import { Image, Carousel as AntCarousel } from 'antd';
import carouselImage1 from "../../assets/images/carousel_1.jpg";
import carouselImage2 from "../../assets/images/carousel_2.jpg";
import carouselImage3 from "../../assets/images/carousel_3.jpg";

const list = [
  {
    key: '1',
    pict: carouselImage1,
  },
  {
    key: '2',
    pict: carouselImage2,
  },
  {
    key: '3',
    pict: carouselImage3,
  }
]

export const Carousel: React.FC = () => {
  return (
    <AntCarousel autoplay className={styles.slider}>
      {
        list.map((item => 
          <Image src={item.pict} key={item.key}/>
        ))
      }
    </AntCarousel>
  )
}